package com.gmics.unifiq;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.widget.ImageView;
import android.widget.TextView;

import com.gmics.android.R;

public class ViewAddress extends Activity {
	private String location, address = null, phone = null, mrt = null;
	private TextView addressTV, phoneTV, mrtTV;
	private ImageView locationLogo;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.view_address_layout);

		location = getIntent().getStringExtra("location");
		addressTV = (TextView) findViewById(R.id.address_tv);
		phoneTV = (TextView) findViewById(R.id.phone_tv);
		mrtTV = (TextView) findViewById(R.id.mrt_tv);
		locationLogo = (ImageView) findViewById(R.id.location_logo);

		if (location.equals("NUS")) {
			address = "21 Lower Kent Ridge Road 119077";
			phone = "6516 6666";
			mrt = "Clementi / Kent Ridge / Buono Vista";
			locationLogo.setBackgroundResource(R.drawable.nus_logo);
		} else if (location.equals("NTU")) {
			address = "Nanyang Ave 639798";
			phone = "6791 1744";
			mrt = "Boon Lay";
			locationLogo.setBackgroundResource(R.drawable.ntu_logo);
		} else if (location.equals("SMU")) {
			address = "81 Victoria St  188065";
			phone = "6828 0100";
			mrt = "Bras Basah";
			locationLogo.setBackgroundResource(R.drawable.smu_logo);
		} else if (location.equals("SIM")) {
			address = "461 Clementi Rd 599491";
			phone = "6248 9777";
			mrt = "Newton";
			locationLogo.setBackgroundResource(R.drawable.sim_logo);
		}

		addressTV.setText(address);
		phoneTV.setText(phone);
		mrtTV.setText(mrt);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
